local ServiceName = require "enum.ServiceName"
local Service = require "core.Service"

---@type table<ServiceName, Service>
local M = {}

setmetatable(M, {
    __index = function(t, k)
        assert(ServiceName[k], "no found service: " .. tostring(k))
        local ser = Service:new(ServiceName[k])
        rawset(t, k, ser)
        return ser
    end
})

return M